package com.bestcem.xm.award.service.dto.awardaward;

import com.bestcem.xm.award.enums.AwardStatusEnum;
import com.bestcem.xm.award.enums.AwardTypeEnum;
import com.bestcem.xm.award.grpc.service.param.draw.PageParam;
import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * 列表查询奖励数据
 * @author sh.pei <sh.pei@idiaoyan.com>
 * @version v1.0
 * @date 2021/7/1 11:13
 */
@ToString
@NoArgsConstructor
@Getter
@Setter
public class ListPageAwardDTO {

    /**
     * 排序方式，结束的放在最后面 最近创建时间在前
     */
    public static final String ORDER_FINISH_LAST_THEN_CREATE_FIRST = "FINISH_LAST_THEN_CREATE_FIRST";

    /**
     * 排序方式，最近创建时间在前
     */
    public static final String ORDER_CREATE_FIRST = "CREATE_FIRST";

    /**
     * 企业id
     */
    @NotBlank(message = "企业标识为空！")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "企业标识异常！")
    private String orgId;

    /**
     * 项目id
     */
    @NotBlank(message = "项目id为空！")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "项目id为空！")
    private String projectId;

    /**
     * 要单独排在前面的奖励id
     */
    private String firstId;

    /**
     * 奖励类型 {@link AwardTypeEnum}
     */
    private List<Integer> tTypes;

    /**
     * 奖励状态 {@link AwardStatusEnum}
     */
    private List<Integer> statuses;

    /**
     * 是否分页
     */
    private boolean paging;

    private PageParam pageParam;

    /**
     * 排序方式
     */
    private String orderBy;
}
